fix wrong if condition
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 27 Jan 2025 17:56:48 +0000 (18:56 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Mon, 27 Jan 2025 17:56:48 +0000 (18:56 +0100)
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/clientsideencryption.cpp

index d797991ad1cacadb380bf6cbdbcb58d2da27eb06..3b035f8b36d8fc698769eeab6b71f8182752e861 100644 (file)
@@ -1694,7 +1694,7 @@ void ClientSideEncryption::decryptPrivateKey(const AccountPtr &account, const QB
                 _privateKey = privateKey;
             } else {
                 const auto deprecatedSha1PrivateKey = EncryptionHelper::decryptPrivateKey(deprecatedSha1Password, key);
-                if (!privateKey.isEmpty()) {
+                if (!deprecatedSha1PrivateKey.isEmpty()) {
                     _privateKey = deprecatedSha1PrivateKey;
                 } else {
                     _privateKey = EncryptionHelper::decryptPrivateKey(deprecatedPassword, key);